package com.iter.devbox.pattern.strategy;

/**策略上下文角色*/
public class StrategyContext {
	/**指向抽象策略的引用*/
	private Strategy strategy;
	
	public StrategyContext(Strategy strategy) {
		this.strategy = strategy;
	}
	
	public void contextMethod() {
		System.out.println("上下文方法");
		strategy.strategyMethod();
	}
}
